<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />  
<meta http-equiv="Pragma" content="no-cache" />  
<meta http-equiv="Expires" content="0" />
<meta charset="utf-8" name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>养修预约</title>
 	<link rel="stylesheet" href="http://carowner.yonyouauto.com/fs01/ase/v1/components/bootstrap/dist/css/bootstrap.min.css">  
    <link href="http://carowner.yonyouauto.com/fs01/ase/v1/components/mobisscroll/css/mobiscroll.custom-3.0.0-beta2.min.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="http://carowner.yonyouauto.com/fs01/ase/v1/components/bootstrapValidator/css/bootstrapValidator.css" type="text/css" />
	<script type="text/javascript" src="http://carowner.yonyouauto.com/fs01/ase/v1/components/jquery2.1.1/jquery.min.js"></script>
	<script type="text/javascript" src="http://carowner.yonyouauto.com/fs01/ase/v1/js/common/py.js"></script>
	<script type="text/javascript" src="http://carowner.yonyouauto.com/fs01/ase/v1/components/bootstrap/dist/js/bootstrap.min.js"></script>
    <script src="http://carowner.yonyouauto.com/fs01/ase/v1/components/mobisscroll/js/mobiscroll.custom-3.0.0-beta2.min.js" type="text/javascript"></script>
    
    <script type="text/javascript" src="http://carowner.yonyouauto.com/fs01/ase/v1/components/hammer/hammer.min.js"></script>
    <script type="text/javascript" src="http://carowner.yonyouauto.com/fs01/ase/v1/components/hammer/jquery.hammer.js"></script>
    
    <script src="http://carowner.yonyouauto.com/fs01/ase/v1/components/bootstrapValidator/js/bootstrapValidator.js"></script>
    <script type="text/javascript" src="http://carowner.yonyouauto.com/fs01/ase/v1/js/common/common.js"></script>
    <script type="text/javascript" src="http://carowner.yonyouauto.com/fs01/ase/v1/js/layer/layer.js"></script>
    <script type="text/javascript" src="http://carowner.yonyouauto.com/fs01/ase/v1/js/common/wechatCommon.js"></script>
    <script type="text/javascript" src="../js/maintain/Gmt.js?_t=2018"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=6WLRtwjdIPrXW5FaNIsgdZG038pLb84Z"></script>
	<style> 
.product-head h1{font-size: 14px;font-family: Arial, Helvetica, sans-serif;margin-bottom: 3px;margin-left: 3px;}
.product-head{font-size: 12px;padding: 4px;background-color: #ccc;width: 235px;}
.filterform input{font-size: 15px;padding: 3px;border: 1px solid #999;}
li{padding: 0;margin: 3px;list-style: none;width: 100%;}
li a{color: #000;font-family: Arial, Helvetica, sans-serif;font-size: 11px}
ul{margin: 0;padding: 0;}
.clear{clear: both;}
body{background-color:#f6f6f6;}
#calendar .calendar-title-box{
	border-bottom:none;
	background-color:#fff;
}

.calendar .prev-month{
	left:20px !important;
}
.calendar .next-month{
	right:20px !important;
}
#calendar .calendar-table td{
	font-size:15px;
	padding: 10px 0px;
}
#calendar .calendar-table tr:first-child{
	background-color:rgb(241,241,240);
}
#calendar .calendar-table tr:first-child th{
	text-align: center;
    font-weight: 400;
    font-size: 15px;
}

#calendar .currentMonth.nowDay{
	color:#FFF;
	background:#3790f3;
	padding:10px 0px;
}

.arrive-time{
	padding: 10px;
    background-color: #f1f1f0;
}

.arrive-time .pm,.arrive-time .am {
	width: 60px;
    height: 30px;
    line-height: 20px;
    box-shadow:none;
    border-color:#3790f3;
    color: #3790f3;
}
.arrive-time .pm.focus,.arrive-time .am.focus,button.btn.btn-default.btn-sm.btpm:focus,button.btn.btn-default.btn-sm.btam:focus{
 box-shadow:none;
 outline:none;
}
.arrive-time .time-select{
	margin-right:5px;
}
#timeSelectRadioGroup{
	width:100%;
}
.btpm,.btam{
	margin: 6px;
    border-radius: 20px !important;
    float:left;
}
button.btn.btn-default.btn-sm.btpm:focus,button.btn.btn-default.btn-sm.btam:focus{
	background-color:#3790f3;
	color:#FFF;
}
.drivide-block{
	width:100%;
	height:40px;
	background-color:#f1f1f0;
	border-bottom: 1px dashed #fff;
    margin-bottom: 13px;
}

.btnbtn1{background-color: #999; color: #fff; width: 100%; height: 45px; border-style: none; border-width: 0; border-radius: 5px;}

a:link{text-decoration:none;color:#000;    /* 指正常的未被访问过的链接*/}
a:visited{text-decoration:none;color:#000; /*指已经访问过的链接*/}
a:hover{text-decoration:none;color:#000;   /*指鼠标在链接*/}
a:active{text-decoration:none;color:#000;  /* 指正在点的链接*/ }

.modal-dialog{padding:50px;}
.modal-body{padding:2px}
.modal-content{padding:10px;}
.modal-footer{margin-top:0px}

.gmt-badge.badge{
	background-color:#fff;
	color:#333;
	padding:3px 3px;
	font-weight: normal;
}

button.btn.btn-default.btn-sm.btpm:focus .gmt-badge.badge, button.btn.btn-default.btn-sm.btam:focus .gmt-badge.badge{
	color:#fff;
	background-color:#3790f3;
}
</style> 
<script type="text/javascript">
	$(function(){
   		$("#am").click(function(){
   		 $(".btpm").css('display', 'none');
   		 $(".btam").css('display', 'block');
  	});
   		$("#pm").click(function(){
      		 $(".btpm").css('display', 'block');
       		 $(".btam").css('display', 'none');
  	});
   });
</script>
</head>
<body>  
<input name="userId" id="userId" class="hidden">  
<div id="myTabContent" class="tab-content">	
	<img id="firstImg" src="http://carowner.yonyouauto.com/fs01/ase/v1/images/GQ/d3.png" style="width:100%;">
	<div  id="maintainMainDiv" class="container formValidate  tab-pane fade" style="padding: 0px"
		data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
		data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
		data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
		<form class="form-horizontal" role="form">
		<div class="list-group">
			<div class="biaoge-2" >
				<!-- <label for="maintainType" class="col-sm-2 control-label">经销商名称</label> -->
					<a id="" class="" href="#">
				<div class="col-sm-10 list-group-item-text">
					<img src="http://carowner.yonyouauto.com/fs01/ase/v1/images/GQ/1.png" style="width:7%;">&nbsp;&nbsp;&nbsp;
					<span id="dealerName"></span>
				</div>
					</a>
			</div>
			<div class="biaoge-2" >
				<!-- <label for="maintainType" class="col-sm-2 control-label">经销商地址</label> -->
					<a id="" class="" href="#" onclick="selectNowDealer(this)">
				<div class="col-sm-10 list-group-item-text">
					<img src="http://carowner.yonyouauto.com/fs01/ase/v1/images/GQ/2.png" style="vertical-align:middle;width:7%;">&nbsp;&nbsp;&nbsp;
					<span id="detailAddress" style="vertical-align:middle;display:inline-block;width:60%;color:#7a7a7a;"></span>
					<span style="display:inline-block;vertical-align:middle;text-align:right;color:#7a7a7a;">换一家</span>
					<span class="biaoge-jt"></span>
				</div></a>
			</div>

			</div>
			<div style="width: 100%;">
			<div class="biaoge-2" >
				<!-- <label for="maintainType" class="col-sm-2 control-label">预约类型</label> -->
					<a id="" class="" href="#" onclick="selectMtType()">
				<div class="col-sm-10 list-group-item-text">
					<img src="http://carowner.yonyouauto.com/fs01/ase/v1/images/GQ/3.png" style="width:7%;">&nbsp;&nbsp;&nbsp;
					<span id="MtType">预约类型</span>
					<span class="biaoge-jt"></span>
				</div></a>
			</div>
			
			<div class="biaoge-2" >
				<!-- <label for="mileage" class="col-sm-2 control-label">当前里程</label> -->
					<a id="" class="" href="#" onclick="selectMileage()">
				<div class="col-sm-10 list-group-item-text">
					<img src="http://carowner.yonyouauto.com/fs01/ase/v1/images/GQ/4.png" style="width:7%;">&nbsp;&nbsp;&nbsp;
					<span id="Mileage">当前里程</span>
					<span class="biaoge-jt"></span>
				</div></a>
			</div>
			
			<div class="biaoge-2" >
				<!-- <label for="activeTime" class="col-sm-2 control-label">到店时间</label> -->
				<a id="" class="" href="#" onclick="selectMaintainTime(this)">
					    <div class="col-sm-10 list-group-item-text">
					   <span class="biaoge-jt"></span>
							<img src="http://carowner.yonyouauto.com/fs01/ase/v1/images/GQ/5.png" style="width:7%;">&nbsp;&nbsp;&nbsp;
							<span id="selectMaintainTimeLink">选择到店时间</span> 
					    </div>
					    </a>
			</div>
			<!-- 隐藏的到店日期和到店时间，方便传递参数 -->
			<input type="hidden" id="maintainDate" name="maintainDate" value="">
			<input type="hidden" id="maintainTime" name="maintainTime" value="">
			
			<div class="biaoge-2" >
				<!-- <label for="seviceUser" class="col-sm-2 control-label">服务顾问</label> -->
				<a id="" class="" href="#" onclick="selectCounselor()">
					<div class="col-sm-10 list-group-item-text">
					<img src="http://carowner.yonyouauto.com/fs01/ase/v1/images/GQ/6.png" style="width:7%;">&nbsp;&nbsp;&nbsp;
					<span id="Counselor">服务顾问</span>
					<span class="biaoge-jt"></span>
				</div>	</a>
				
			</div>
			<div class="biaoge-2" >
				<!-- <label for="" class="col-sm-2 control-label">车辆信息</label> -->
				<a id="" class="" href="#" onclick="">
					<div class="col-sm-10 list-group-item-text">
					<span id="" class="glyphicon form-control-feedback" style="text-align:right;"></span>
							<img src="http://carowner.yonyouauto.com/fs01/ase/v1/images/GQ/7.png" style="width:7%;">&nbsp;&nbsp;&nbsp;&nbsp;车辆信息
							<span id="licenseNo" style="float:right;color:#7a7a7a"></span>
							<!-- <span id="moName" style="float:right;color:#7a7a7a"></span> -->
				</div>	    </a>
				
			</div>
			</div>
			<p>
			<p>
	<div class="form-group">
		    <textarea id="remarks" class="form-control" rows="3" placeholder="请输入您需要备注的内容，或故障的描述"
		            maxlength="200" style="width:90%;margin:0 auto;"
                    data-bv-stringlength-message="长度最大200字符"></textarea>
	    </div>
			<div class="form-group has-feedback">
				<div style="margin-right: 15px; padding-left: 15px; padding-right: 15px; margin-left: 15px;">
				<button id="immediatelyAppoint" type="button" class="btnbtn" style="background:#3790f3">预约</button>
				</div>
			</div>
			<p>
				<input type="hidden" id="salesConsultantId" name="salesConsultantId" value=""> 
				<input type="hidden" id="salesConsultantPhone" name="salesConsultantPhone" value=""> 
				<input type="hidden" id="vin" name="vin" value=""> 
				<input type="hidden" id="phone" name="phone" value="">
				<input type="hidden" id="modelName" name="modelName" value=""> 
				<input type="hidden" id="sourceType" name="sourceType" value="10011001"/>
				<input type="hidden" id="dealerCode" name="dealerCode" value=""> 
				<input type="hidden" id="openId" name="openId" value=""> 
				<input type="hidden" id="appointType" name="appointType" value=""> 
				<input type="hidden" id="MaintainKM" name="MaintainKM" value=""> 
					
			</form>		
		</div>
	</div>
	<!-- 定位当前城市经销商-经销商选择二级页面 -->
	<div id="nowDealerDiv" class="tab-pane fade">
	<script>
	//距离近-距离远
	function near(){
    	var aDiv = document.getElementsByTagName('li');
    	var oUl = document.getElementById("dealerDiv");  
    	var arr = [];
    	for(var i=0;i<aDiv.length;i++)
    	{
       		 arr.push(aDiv[i]);  //aDiv是元素的集合，并不是数组，所以不能直接用数组的sort进行排序。
   		 }
    	arr.sort(function(a,b){return a.getAttribute('data-id') - b.getAttribute('data-id')});
    	for(var i=0;i<arr.length;i++)
    	{
    		oUl.appendChild(arr[i]); //将排好序的元素，重新塞到body里面显示。
    	}
	}
	//距离远-距离近
	function far(){
    	var aDiv = document.getElementsByTagName('li');
    	var oUl = document.getElementById("dealerDiv");  
    	var arr = [];
    	for(var i=0;i<aDiv.length;i++)
    	{
       		 arr.push(aDiv[i]);  //aDiv是元素的集合，并不是数组，所以不能直接用数组的sort进行排序。
   		 }
    	arr.sort(function(a,b){return b.getAttribute('data-id') - a.getAttribute('data-id')});
    	for(var i=0;i<arr.length;i++)
    	{
    		oUl.appendChild(arr[i]); //将排好序的元素，重新塞到body里面显示。
    	}
	}
</script>
    	<img src="http://carowner.yonyouauto.com/fs01/ase/v1/images/GQ/d2.png" style="width:100%;" onclick="selectMaintainDealer(this)" >
		<form class="filterform" action="#">
		<div >
    	<br><input id="sou" class="filterinput form-control" type="text" placeholder="搜索" style="width:80%;margin:0 auto;font-size:16px;">
		</div>
		
<div class="dropdown">
	<button type="button" class="btn dropdown-toggle" id="dropdownMenu1" 
			data-toggle="dropdown" style="background-color:#f6f6f6;font-size:16px;">
		距离
		<span class="caret"></span>
	</button>
	<ul  style="text-align:center;" id="distance" class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
		
			<a role="presentation" tabindex="-1" onclick="near()" style="font-size:16px;"><span>由近到远</span></a><br>
			<a role="presentation" tabindex="-1" onclick="far()" style="font-size:16px;"><span>由远到近</span></a>
		
	</ul>
</div>

			<div id="searchDealer"></div>
		<ul id="list2">
		<li id="KmFirst" data-id="KmFirst" style="margin: 0px;padding: 3px;">
			<div class="panel panel-default">
				<table style="width:100%" class="table-condensed"><tbody>
					<tr>
					<td style="width:160px;text-align:left;"><a onclick="sureDealer(-1)">
					<p id="nameFirst" style="font-family:黑体;font-size:16px;color:#000000"></p>
					</a></td>
					<td style="width:100px;text-align:center;font-size:14px;color:#7a7a7a">
					<span>距离：</span><span id="distanceFirst"></span>
					</td>
					</tr><tr>
					<td style="width:160px;text-align:left;">
					<span id="addrFirst" style="font-faminly:宋体;font-size:15px;color:#615f5f"></span><br>
					<span id="remarkFirst" style="font-faminly:宋体;font-size:14px;color:#7a7a7a"></span>
					</td>
					<td style="width:100px;text-align:center;color:#7a7a7a">
					<a href="" id="Tel">
					<span class="glyphicon glyphicon-earphone" style="color: rgb(255, 0, 23); font-size: 12px;"></span>
					<span style="font-family:宋体;font-size:14px;color:#7a7a7a"> 电话</span>
					</a></td>
					</tr>
				</tbody></table>
				<input id="codeFirst" class="hidden" value="">
				
			</div></li>
			
		<div id="dealerDiv" class="">
		</div>
		</ul>
		<!-- <div> <button style="background-color: #3790f3;font-size:17px;" id="closeSureDealerBtn" type="button"
					class="btn btn-primary btn-block" onclick="closeSureDealer()">关闭</button>	</div> -->
		<div class="form-group has-feedback">
			<div style="margin-right: 15px; padding-left: 15px; padding-right: 15px; margin-left: 15px;">
				<button id="closeSureDealerBtn" type="button" class="btnbtn" onclick="closeSureDealer()" style="background:#3790f3">关闭</button>
			</div>
		</div>			
		
	</div>
    <!-- 经销商选择-三级页面 -->
    <div id="maintainDealerDiv" class="tab-pane fade">
    <img src="http://carowner.yonyouauto.com/fs01/ase/v1/images/GQ/d1.png" style="width:100%;">
    <form class="filterform" action="#">
    <div><br>
    <input id="cha" class="filterinput form-control" type="text" placeholder="搜索" style="width:80%;margin:0 auto;">
  </div>
  <div id="searchCity"></div>
    <div id="dealerMap" class="container">
 					<ul id="list1">
						<h3>A</h3>
						<div id="a" style="background-color: #fff"></div>
						<h3>B</h3>
						<div id="b" style="background-color: #fff"></div>
						<h3>C</h3>
						<div id="c" style="background-color: #fff"></div>
						<h3>D</h3>
						<div id="d" style="background-color: #fff"></div>
						<h3>E</h3>
						<div id="e" style="background-color: #fff"></div>
						<h3>F</h3>
						<div id="f" style="background-color: #fff"></div>
						<h3>G</h3>
						<div id="g" style="background-color: #fff"></div>
						<h3>H</h3>
						<div id="h" style="background-color: #fff"></div>
						<h3>I</h3>
						<div id="i" style="background-color: #fff"></div>
						<h3>J</h3>
						<div id="j" style="background-color: #fff"></div>
						<h3>K</h3>
						<div id="k" style="background-color: #fff"></div>
						<h3>L</h3>
						<div id="l" style="background-color: #fff"></div>
						<h3>M</h3>
						<div id="m" style="background-color: #fff"></div>
						<h3>N</h3>
						<div id="n" style="background-color: #fff"></div>
						<h3>O</h3>
						<div id="o" style="background-color: #fff"></div>
						<h3>P</h3>
						<div id="p" style="background-color: #fff"></div>
						<h3>Q</h3>
						<div id="q" style="background-color: #fff"></div>
						<h3>R</h3>
						<div id="r" style="background-color: #fff"></div>
						<h3>S</h3>
						<div id="s" style="background-color: #fff"></div>
						<h3>T</h3>
						<div id="t" style="background-color: #fff"></div>
						<h3>U</h3>
						<div id="u" style="background-color: #fff"></div>
						<h3>V</h3>
						<div id="v" style="background-color: #fff"></div>
						<h3>W</h3>
						<div id="w" style="background-color: #fff"></div>
						<h3>X</h3>
						<div id="x" style="background-color: #fff"></div>
						<h3>Y</h3>
						<div id="y" style="background-color: #fff"></div>
						<h3>Z</h3>
						<div id="z" style="background-color: #fff"></div>
					</ul>
    </div>
			</div>	
	<!-- 预约时间-二级页面 -->
	<br><div id="maintainDateSelDiv" class="container tab-pane fade">
	<link rel="stylesheet" href="../components/new.min.css"> 	
  <link rel='stylesheet' href='../js/laydate/laydate.css' /> 
  	  <div class='calendar' id='calendar'></div><br>
  	  <script type='text/javascript' src='../js/laydate/laydate-mt.js'></script>

		<div class="arrive-time">
			<span class="time-select">可选到店时间</span>
			<div class="btn-group " data-toggle="buttons">
				<label id="am" class="btn btn-default am"checked="true">上午 <input type="radio"
					name="options" id="option1" >
				</label> 
				<label id="pm" class="btn btn-default pm"> <input
					type="radio" name="options" id="option2">下午
				</label>
			</div>
		</div>
		<div id="timeSelectRadioGroup" class="input-group input-group-m" style="font-size: 18px;background-color:#fff"></div>

		<div style="text-align:center;font-family:黑体;padding:5px 0px;">
			<span>预约到店时间&nbsp;&nbsp;</span> 
			<span id="day" name="day" style="color: #3790f3"></span>
			<span id="time" name="time" style="color: #3790f3"></span>
		</div>
		<!-- <div class="drivide-block"></div> -->
		<button style="background-color: #3790f3;font-size:17px;" id="timeConfirmBtn" type="button"
					class="btnbtn" onclick="confirmMaintainTime(this)">确认</button>	
					<button style="background-color: #3790f3;font-size:17px;margin-top:5px" id="timeCloseBtn" type="button"
					class="btnbtn" onclick="closeMaintainTime(this)">关闭</button>	
	</div>
	
	<script type="text/javascript">
	$("#nowDealerDiv").hide();
	$("#maintainDealerDiv").hide();
	$("#maintainDateSelDiv").hide();

		function validat() {
			$('.formValidate').bootstrapValidator('validate');
			var isValid = $(".formValidate").data("bootstrapValidator")
					.isValid();

			return isValid;

		}
	</script>
		<!-- 确认模态框（Modal） -->
<div class="modal fade" id="sureModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<!-- <div class="modal-header" align="left"> -->
		<!-- - <button type="button" class="close" data-dismiss="modal" 
						aria-hidden="true">
				</button> -->
				<!-- <h4 class="modal-title" style="text-align:center">
					尊敬的客户，您好！
				</h4>
			</div> -->
			<div class="modal-body" style="text-align:center;">
			<p style="text-align:left">尊敬的客户，您好！</p>
			<p style="text-center">您已成功预约了这次养修！</p>
			</div>
			<div class="modal-footer" style="padding:5px;text-align:right">
				<!-- <button type="button" class="btn btn-default" onclick="re()">确定
				</button> -->
				<span style="margin-right:15px;color:green;font-size:16px" onclick="re()">确定</span>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
		<!-- 顾问模态框（Modal） -->
<div class="modal fade" id="counselorModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="top:10%">
	<div class="modal-dialog" >
		<div class="modal-content">
		<div class="modal-body" style="text-align:center;">
		<div name="seviceUser" id="seviceUser" class="list-group" style="margin-bottom: 0px;">
		</div>
		<!-- <select name="seviceUser" id="seviceUser" class="form-control" placeholder=""
						style="padding: 6px 40px" onchange="addCounseor()">
					</select> -->
		</div>
		</div><!-- /.modal-content -->
		<button type="button" id="conselorBtn" class="close" data-dismiss="modal" 
						aria-hidden="true">
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- 当前里程模态框（Modal） -->
<div class="modal fade" id="MileageModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="top:10%">
	<div class="modal-dialog">
		<div class="modal-content">
		<div class="modal-body" style="text-align:center;">
		<div style="top:20%;height:300px;overflow: auto;position: relative;">
		<div id="mileage" class="list-group">
		</div>
		</div>
		
<!-- 		<select name="mileage" id="mileage" class="form-control" placeholder=""
						style="padding: 6px 40px" onchange="addMileage()">
					</select> -->
					</div>
		</div><!-- /.modal-content -->
		<button type="button" id="MileageBtn" class="close" data-dismiss="modal" 
						aria-hidden="true">
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- 预约类型模态框（Modal） -->
<div class="modal fade" id="MtTypeModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="top:10%">
	<div class="modal-dialog">
		<div class="modal-content">
		<div class="modal-body" style="text-align:center;">
		<div class="list-group" style="margin-bottom: 0px;">
		<a class="list-group-item" onclick="addMtType(1)" id="appointType1" name="SelRadio" value="1">
			保养
			<input class="hidden" id="mtType1" value="保养">
		</a>
		<a class="list-group-item" onclick="addMtType(2)" id="appointType2" name="SelRadio" value="2">
			维修
			<input class="hidden" id="mtType2" value="维修">
		</a>
		<!-- <label>
		<input onclick="addMtType(1)" name="SelRadio" id="appointType1" type="radio" value="1">保养
		</label>
		</div>
		<div class="radio">
		<label>
		<input onclick="addMtType(2)" name="SelRadio" id="appointType2" type="radio" value="2">维修
		<input class="hidden" id="mtType2" value="维修">
		</label> -->
		</div>
		<!-- <select name="appointType" id="appointType" class="form-control" style="padding: 6px 40px"  onchange="addMtType()">
						<option value="0" selected name="保养">保养</option>
						<option value="2" name="维修">维修</option>
		</select> -->
		</div>
		</div><!-- /.modal-content -->
		<button type="button" id="MtTypeBtn" class="close" data-dismiss="modal" 
						aria-hidden="true">
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- 定位 -->
	<input class="hidden" id="regionName" name="regionName" value="">
	<input class="hidden" id="latitude" name="latitude" value="">
	<input class="hidden" id="longitude" name="longitude" value="">
<div id="allmap"></div>
	<script type="text/javascript">
		$("#allmap").hide();
		var map = new BMap.Map("allmap");
		var point = new BMap.Point(116.709684, 39.89778);
		map.centerAndZoom(point, 16);
		map.enableScrollWheelZoom();

		var myIcon = new BMap.Icon("myicon.png", new BMap.Size(30, 30), {
			anchor : new BMap.Size(10, 10)
		});

		var marker = new BMap.Marker(point, {
			icon : myIcon
		});
		map.addOverlay(marker);

		var geolocation = new BMap.Geolocation();
		geolocation.getCurrentPosition(function(r) {
			if (this.getStatus() == BMAP_STATUS_SUCCESS) {
				var mk = new BMap.Marker(r.point);
				map.addOverlay(mk);
				//map.panTo(r.point);//地图中心点移到当前位置
				var latCurrent = r.point.lat;
				var lngCurrent = r.point.lng;
				//alert('我的位置：' + latCurrent + ',' + lngCurrent);
				$("#latitude").val(latCurrent);
				$("#longitude").val(lngCurrent);
				//根据经纬度查城市名
				getAddress(lngCurrent, latCurrent);
				//location.href="http://api.map.baidu.com/direction?origin="+latCurrent+","+lngCurrent+"&destination=39.89778,116.709684&mode=driving&region=北京&output=html";

			} else {
				//alert('failed' + this.getStatus());
			}
		}, {
			enableHighAccuracy : true
		})

		map.addOverlay(marker);
		var licontent = "";
		var opts = {
			width : 200,
			height : 80,
		};
		var infoWindow = new BMap.InfoWindow(licontent, opts);
		marker.openInfoWindow(infoWindow);
		marker.addEventListener('click', function() {
			marker.openInfoWindow(infoWindow);
		});

		function getAddress(longitude, latitude) {

			var address;

			//通过baiduMap API获取街道名称
			var map = new BMap.Map("allmap");
			var point = new BMap.Point(longitude, latitude);
			var gc = new BMap.Geocoder();

			gc.getLocation(point, function(rs) {

				var addComp = rs.addressComponents;

				address = addComp.province + ", " + addComp.city + ", "
						+ addComp.district + ", " + addComp.street + ", "
						+ addComp.streetNumber;
				//alert(addComp.city);
				$("#sou").attr('placeholder',"当前城市为："+addComp.city);
				$("#regionName").val(addComp.city);
			});
			return address;
		}
	</script>
</body>

</html>